#pragma once
#include "MyEffect.h"

class HighLight : public MyEffect
{
private:
	int _highLightWidth;

public:
	HighLight(void)
	{
	}
	
	HighLight(int width)
	{
		_highLightWidth = width;
	}

	~HighLight(void)
	{
	}

	HighLight(int x, int y, int width, int height, char stroke[], int strokeWidth, char fill[])
	{
	}

	void SetHighLightWidth(int width)
	{
		_highLightWidth = width;
	}

	string GetName()
	{
		return "HighLight";
	}

	void DrawEffect(MyGraphics* g)
	{
		// Giu lai do day net, mau net ve va vi tri ban dau doi tuong no chua (_shape)
		int oldStrokeWidth = _shape->GetStrokeWidth();
		char oldColor[3];
		_shape->GetStrokeColor(oldColor);
		//MyPoint oldPosition = _shape->GetPosition();

		// Cap nhat lai do day net, mau net ve ve va vi tri cua doi tuong no chua
		_shape->SetStrokeWidth(_highLightWidth);
		_shape->SetStrokeColor(_color);
		//_shape->SetPosition(oldPosition.x - oldStrokeWidth / 2, oldPosition.y - oldStrokeWidth / 2);
		
		// Keu doi tuong no chua hay ve voi thong tin moi
		_shape->Draw(g);

		// Tra lai thong tin cu cho doi tuong no chua
		//_shape->SetPosition(oldPosition.x, oldPosition.y);
		_shape->SetStrokeColor(oldColor);
		_shape->SetStrokeWidth(oldStrokeWidth);
	}
};

